<template>
<div class='home'>
  <el-container style="height: 100vh; border: 1px solid #eee">
    <el-aside width="200px" style="background-color: #304156">
    <div class="sidebar-content">
      <a href="#">
        <img src="../assets/images/logo.png" alt="" class="sidebar-logo">
        <h1 class="sidebar-title">SCDQ-后台管理</h1>
      </a>
    </div>
    <el-menu
    background-color="#1f2d3d"
    text-color="#BFCBD9"
    :unique-opened="true"
    >
    <el-menu-item index="1">
        <i class="el-icon-menu"></i>
        <span slot="title">首页</span>
      </el-menu-item>
    <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>系统管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="2-1">
            <i class="el-icon-location"></i>
            <span>用户管理</span>
          </el-menu-item>
          <el-menu-item index="2-2">
            <i class="el-icon-location"></i>
            <span>角色管理</span>
          </el-menu-item>
          <el-menu-item index="2-3">
            <i class="el-icon-location"></i>
            <span>菜单管理</span>
          </el-menu-item>
          <el-menu-item index="2-4">
            <i class="el-icon-location"></i>
            <span>部门管理</span>
          </el-menu-item>
          <el-menu-item index="2-5">
            <i class="el-icon-location"></i>
            <span>岗位管理</span>
          </el-menu-item>
          <el-menu-item index="2-6">
            <i class="el-icon-location"></i>
            <span>字典管理</span>
          </el-menu-item>
          <el-menu-item index="2-7">
            <i class="el-icon-location"></i>
            <span>任务调度</span>
          </el-menu-item>
         </el-menu-item-group>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>系统监控</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="3-1">
            <i class="el-icon-location"></i>
            <span>用户管理</span>
          </el-menu-item>
          <el-menu-item index="3-2">
            <i class="el-icon-location"></i>
            <span>角色管理</span>
          </el-menu-item>
          <el-menu-item index="3-3">
            <i class="el-icon-location"></i>
            <span>菜单管理</span>
          </el-menu-item>
          <el-menu-item index="2-4">
            <i class="el-icon-location"></i>
            <span>部门管理</span>
          </el-menu-item>
          <el-menu-item index="2-5">
            <i class="el-icon-location"></i>
            <span>岗位管理</span>
          </el-menu-item>
          <el-menu-item index="2-6">
            <i class="el-icon-location"></i>
            <span>字典管理</span>
          </el-menu-item>
          <el-menu-item index="2-7">
            <i class="el-icon-location"></i>
            <span>任务调度</span>
          </el-menu-item>
         </el-menu-item-group>
      </el-submenu>
      <el-menu-item index="4">
        <i class="el-icon-menu"></i>
        <span slot="title">运维管理</span>
      </el-menu-item>
      <el-menu-item index="5">
        <i class="el-icon-menu"></i>
        <span slot="title">系统工具</span>
      </el-menu-item>
      <el-menu-item index="6">
        <i class="el-icon-menu"></i>
        <span slot="title">组件管理</span>
      </el-menu-item>
    </el-menu>
  </el-aside>
  <el-container>
    <el-header style="text-align: right; font-size: 12px">
      <el-dropdown>
        <i class="el-icon-setting" style="margin-right: 15px"></i>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>查看</el-dropdown-item>
          <el-dropdown-item>新增</el-dropdown-item>
          <el-dropdown-item>删除</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
      <span>王小虎</span>
    </el-header>
    <el-main>
      页面内容
    </el-main>
  </el-container>
</el-container>
</div>
</template>

<script>

export default {
  name: '',
  props: [],
  components: {}, // 定义子组件
  data () {
    return {
    }
  },
  computed: {}, // 计算
  watch: {}, // 监视
  methods: {
  },
  // 生命周期 - 挂载完成（可以访问DOM元素）
  mounted () {

  }
}
</script>
<style  lang="scss" scoped>
/* scoped 使用得定义的样式只在本页面内生效  */

.sidebar-content {
  position: relative;
  width: 100%;
  height: 50px;
  line-height: 50px;
  text-align: center;
  overflow: hidden;
}

.sidebar-logo {
  display: inline-block;
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 6px;
}
 .sidebar-title {
    display: inline-block;
    color: #FFF;
    font-weight: 600;
    line-height: 50px;
    font-size: 14px;
    vertical-align: middle;
 }
 .el-menu-item:focus, .el-menu-item:hover {
    outline: 0;
    background-color: #263445;
}
 ::v-deep .el-submenu__title:hover {
  background: #263445;
}
.el-submenu > .el-menu {
  background-color: #1f2d3d;
}
</style>
